bitmap

Section: Misc. Reference Manual Pages (5L)
Updated: April 30, 1986
Index Return to Main Contents
 

NAME

Bitmap - Bitmap header format for mgr bitmaps.  

SYNOPSIS

#include "dump.h"  

DESCRIPTION

There are two styles of bitmaps recognized by MGR , The old machine dependent format, and the new portable format.

Old bitmap files are prepended with a 6 byte ascii header which contains: 1) a two byte magic number, 2) a 2 byte bitmap width, and 3) a two byte bitmap height. The bitmap data follows the header in raster scan order, with each row padded out to a 16 bit boundary.

The new, portable bitmap format consists of an 8 byte ascii header containing: 1) a two byte magic number, 2) a 2 byte bitmap width, 3) a two byte bitmap height, a single byte bitmap depth, and 1 reserved byte. The bitmap data follows the header in raster scan order, with each row padded to a byte boundary.

The following macros, defined in dump.h may be useful for dealing with bitmap headers:

B_HSIZE
The bitmap header size in bytes.
B_GETHDR(header,width,height)
extracts the width and height from the B_HSIZE buffer header
B_PUTHDR(header,width,height)
produces a bitmap header for a bitmap width bits wide and height bits high.
B_ISHDR(header)
returns true if header is a valid bitmap header
B_SIZE(width,height)
returns the size in bytes (not including the header) of a bitmap width bits wide and height bits high.
B_MAGIC
is a pointer to a character string whose first 2 bytes are the bitmap header magic number.
 

BUGS

The existence of two different bitmap formats is unfortunate. The old format should go away when the programs that use it are rewritten.  

SEE ALSO

mgr(1L)


 

Index

NAME
SYNOPSIS
DESCRIPTION
BUGS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 16:01:34 GMT, March 03, 2023